<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- Tell the browser to be responsive to screen width -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <!-- Favicon icon -->
    <!--<link rel="stylesheet" href="css/iview.min.css">-->
    <!--<link rel="stylesheet" type="text/css" href="http://unpkg.com/iview/dist/styles/iview.css">-->
    <link rel="icon" type="image/png" sizes="16x16" href="../assets/images/favicon.ico">
    <title>壹脉智能CRM</title>
    <!-- Bootstrap Core CSS -->
    <link href="./css/bootstrap.min.css" rel="stylesheet">
    <!-- <link href="../assets/node_modules/perfect-scrollbar/css/perfect-scrollbar.css" rel="stylesheet"> -->
    <!-- This page CSS -->
    <!-- chartist CSS -->
    <!-- <link href="../assets/node_modules/morrisjs/morris.css" rel="stylesheet"> -->
    <!--c3 CSS -->
    <!-- <link href="../assets/node_modules/c3-master/c3.min.css" rel="stylesheet"> -->
    <!--Toaster Popup message CSS -->
    <!-- <link href="../assets/node_modules/toast-master/css/jquery.toast.css" rel="stylesheet"> -->
    <!-- Custom CSS -->
    <link href="css/style.min.css" rel="stylesheet">
    <!-- Dashboard 1 Page CSS -->
    <!--<link href="css/pages/dashboard1.css" rel="stylesheet">-->
    <!-- You can change the theme colors from here -->
    <link href="css/colors/default.css" id="theme" rel="stylesheet">
    <link rel="stylesheet" href="css/diy.min.css">
    <!--<link href="../assets/node_modules/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="../assets/node_modules/bootstrap-table/dist/bootstrap-table.min.css" rel="stylesheet" type="text/css"/>-->
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        .layui-layer{
            width: auto !important;
            left: 50% !important;
            transform: translateX(-50%) !important;
        }
    </style>
</head>

<body class="fix-header fix-sidebar card-no-border">
<div class="preloader">
    <div class="loader">
        <div class="loader__figure"></div>
        <p class="loader__label">壹脉</p>
    </div>
</div>
<div id="main-wrapper">
    <header class="topbar">
        <nav class="navbar top-navbar navbar-expand-md navbar-light">
            <div class="navbar-header">
                <a class="navbar-brand" href="../index.html">
                    <b>
                        <img src="../assets/images/diy/yimai.png" alt="homepage" class="dark-logo"/>
                        <!--<img src="../assets/images/logo-light-icon.png" alt="homepage" class="light-logo"/>-->
                    </b>
                    <span>
                        <span class="fs18 cblue p-l-6 fbold">壹脉智能CRM</span>
                    </span>
                </a>
            </div>
            <div class="navbar-collapse">
                <ul class="navbar-nav mr-auto">
                    <li class="nav-item"><a class="nav-link nav-toggler hidden-md-up waves-effect waves-dark"
                                            href="javascript:void(0)"><i class="sl-icon-menu"></i></a></li>
                    <li class="nav-item"><a class="nav-link sidebartoggler hidden-sm-down waves-effect waves-dark"
                                            href="javascript:void(0)"><i class="sl-icon-menu"></i></a></li>
                </ul>
                <user-head></user-head>
            </div>
        </nav>
    </header>
    <aside class="left-sidebar">
        <company-position></company-position>
        <div class="scroll-sidebar">
            <nav class="sidebar-nav p-0">
                <c-slider></c-slider>
            </nav>
        </div>
    </aside>
    <div class="page-wrapper">

        <div class="container-fluid">

            <div class="row page-titles">
                <div class="col-md-5 align-self-center">
                    <h3 class="text-themecolor">客户管理</h3>
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item"><a href="javascript:void(0)">HOME</a></li>
                        <li class="breadcrumb-item active">
                            <a href="/main/customerManage.html">
                                客户管理
                            </a>
                        </li>
                        <li class="breadcrumb-item active">跟进详情</li>
                    </ol>
                </div>
            </div>

            <div class="bgfff p-t-30 p-l-30 p-r-31 p-b-30">
                <!--操作-->
                <div class="row d-flex fs14 lh30 p-l-15 p-r-15">
                    <div class="mr-auto d-flex">
                        <span v-if="clientInfo.customerState == 2" class="bgblue p-l-20 p-r-19 cfff m-r-10 bradius4" @click="toMonopoly">抢为独占</span>
                        <template v-else>
                            <span class="bgblue p-l-20 p-r-19 cfff m-r-10 bradius4" @click="tomember">移至成员</span>
                            <span class="bgblue p-l-20 p-r-19 cfff m-r-10 bradius4" @click="moveCustomer(2)">移至共享</span>
                        </template>

                        <span class="bblue p-l-20 p-r-19 cblue m-r-10 bradius4" @click="toEditClient">编辑</span>

                    </div>
                </div>

                <div class="fs14 p-t-18 p-b-15">基本资料</div>

                <table class="align-cen-table textc display nowrap table table-hover table-bordered bgf6f9fa m-b-20">
                    <thead>
                    <tr>
                        <th>姓名</th>
                        <th>手机号码</th>
                        <th>邮箱</th>
                        <th>微信号</th>
                        <th>企业微信</th>
                        <th>职位</th>
                        <th>公司</th>
                        <th>标签</th>
                    </tr>
                    </thead>
                    <tbody class="bgfff">
                    <tr class="curpointer" >
                        <td>{{clientInfo.name}}</td>
                        <td>{{clientInfo.phone}}</td>
                        <td>{{clientInfo.email}}</td>
                        <td>{{clientInfo.personalWx}}</td>
                        <td>{{clientInfo.companyWx}}</td>
                        <td>{{clientInfo.position}}</td>
                        <td>{{clientInfo.createCompanyName}}</td>
                        <td class="lh30 fs14 p-r-30 clearfix">
                            <div class="float-left">
                                <span class="d-inline-block bradius6 p-l-20 p-r-20 m-r-10"
                                      v-for="(item,idx) in clientInfo.lableResponseList" :key="idx"
                                      :class="item.lableColor == '#f5f5f6' ? 'c78' : 'cfff' "
                                      :style="{background:item.lableColor}"
                                >
                                             {{item.lableName}}
                                         </span>
                            </div>
                        </td>
                    </tr>
                    </tbody>
                </table>

                <div class="bef0 lh45 d-flex align-cen fs14 m-b-20">
                    <span class="w120 textc bgf6f9fa">备注</span>
                    <input type="text" placeholder="这里是备注内容"
                           class="p-l-32 h45 b0 blef0"
                           v-model="clientInfo.customerRemark"
                           readonly
                           style="width: calc(100% - 208px)">
                </div>

                <div class="clearfix">
                    <div class="w55p float-left">
                        <p class="bgf6f9fa bef0 lh40 p-l-30 fs14 m-b-0">跟进记录</p>
                        <div class="comment-widgets bef0 border-top-0 h388 oyauto" ref="followList">
                            <div class="textc show-more p-t-5" @click="getFollowLog" v-if="followLog.length>=10 && !noData">查看更多</div>
                            <!-- Comment Row -->
                            <div class="d-flex flex-row comment-row" v-for="(item,k) in followLog">
                                <div class="">
                                    <span class="round" >
                                        <div class="img-bg-box w50 h50 braduis50p"
                                             :style="'background-image: url('+(item.logo || 'https://you-one-stand.oss-cn-shanghai.aliyuncs.com/yimai_photos/crm/card1_user.png')+')'">
                                        </div>
                                    </span>
                                </div>
                                <div class="comment-text active w-100">
                                    <h5 class="fs14 cbcc m-b-10">{{item.followName}}</h5>
                                    <div class="d-flex align-cen jsbet">
                                        <div class="m-b-0 p-t-13 contentbox lh22 p-b-13 p-l-19 p-r-22 bradius4 flex1"
                                             :class="k == followLog.length-1 ? 'bgblue cfff' : 'bgf6f9fa c26' ">
                                            <template v-if="item.followType">
                                                [{{item.followType | formatFollowType}}]
                                                ‧
                                            </template>
                                            <template v-if="item.followRemark.type != 1">
                                                {{item.followRemark.data}}
                                            </template>
                                            <div class="d-flex wrap" v-else>
                                                <span class="m-r-10 ">打上标签</span>
                                                <span class="p-l-20 p-r-20 bradius6 m-r-10 m-b-10 curpointer lh30"
                                                      v-for="(v,k) in item.followRemark.data" :key="k"
                                                      :class="v.lableColor.toLowerCase() == '#f5f5f6' ? 'c78' : 'cfff' "
                                                      :style="{background:v.lableColor}"
                                                >
                                                            {{v.lableName}}
                                                        </span>

                                            </div>
                                        </div>
                                        <span class="fs14 cbcc w118 contentbox text-right p-l-20">{{item.createTime | formatDate('yyyy/MM/dd hh:mm')}}</span>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!--添加跟进记录-->
                        <div class="bef0 border-top-0 p-l-30 p-t-29 p-r-30 p-b-30">
                            <input type="text" class="b0 phgray fs14 w100p p-b-27" v-model="followRemark" placeholder="请输入跟进记录">

                            <div class="clearfix">
                                <div class="float-left lh40">
                                    <span :class="logs_id == v.id ? 'cblue' : 'cbcc' "
                                          v-for="(v,k) in  logs_type"
                                          :key="k"
                                          class="p-r-20"
                                          v-html="v.title"
                                          @click="log_type_tap(v.id)"></span>
                                </div>
                                <div class="float-right">
                                    <span class="bgblue p-l-20 lh40 d-inline-block p-r-19 cfff m-r-10 bradius4"
                                          @click="addFollowLog"
                                          :class="isFollowLoading||!followRemark.trim() ? 'disabled' : ''">
                                        保存
                                    </span>
                                </div>
                            </div>

                        </div>
                    </div>

                    <div class="w45p p-l-30 float-right p-r-30">
                        <p class="bgf6f9fa bef0 lh40 p-l-30 fs14 m-b-0">总成交金额</p>

                        <div class="bef0 border-top-0 p-l-30">

                            <div class="form-group m-b-0 p-t-20">
                                <label class="control-label has-danger">
                                    录入成交金额
                                    <span class="form-control-feedback">*</span>
                                </label>
                                <input type="number"
                                       min="0"
                                       class="form-control phgray col-md-6 d-block"
                                       v-model="moneyForm.money"
                                       @blur="onlyNum"
                                       placeholder="请输入成交金额">
                            </div>


                            <div class="form-group m-b-0 p-t-29 p-b-29">
                                <label class="control-label has-danger">
                                    备注
                                </label>
                                <div class="d-flex jsbet">
                                    <input type="text"
                                           class="form-control phgray flex1 d-block"
                                           v-model="moneyForm.remark"
                                           placeholder="请输入备注">

                                </div>
                            </div>

                            <div class="form-group m-b-0 p-b-20">
                                <label class="control-label has-danger">
                                    上传图片
                                </label>
                                <div class="disflex wrap">
                                    <div class="goods-img w100 h100 m-r-5 m-b-5 bradius4 position-relative"
                                         v-for="(img,key) in photos"
                                         @click="prevImg(img)"
                                         :style="'background-image: url('+img+')'">
                                        <img @click.stop="delPic(key)"
                                             class="del-goods-pic w20"
                                             src="https://you-one-stand.oss-cn-shanghai.aliyuncs.com/yimai_photos/crmpc/2f2fbcd8d2b2177e884423142be14ac.png">
                                    </div>
                                    <label v-if="photos.length<9" class="w100 h100 bradius4 textc bced m-r-20 position-relative ohidden icon-plus bradius4">
                                        <input type="file" class="hide" ref="file" @change="uploadImg">
                                    </label>
                                </div>
                            </div>

                            <div class="p-b-29">
                                <span class="bgblue p-l-20 lh40 d-inline-block p-r-19 cfff bradius4"
                                      :class="moneyLoading ? 'disabled' : ''"
                                      @click="addMoneyLog">
                                        添加
                                    </span>
                            </div>

                        </div>

                        <div class="lh71 bef0 border-top-0 c26 p-l-30 border-bottom-0">
                            成交金额：{{totalMoney}}元
                        </div>

                        <div class="border-top-0 bef0 money-log">
                            <div v-for="(v,k) in moneyLog" :key="k" class="btef0">
                                <div class="lh40 d-flex jsbet p-l-25 p-r-25 c26 log-info">
                                    <span class="cbcc">{{v.createTime | formatDate('yyyy/MM/dd hh:mm')}}</span>
                                    <span :title="v.name">{{v.name}}</span>
                                    <span :title="'￥'+(v.money/100).toFixed(2)">￥{{v.money | formatMoney}}</span>
                                    <span :title="v.remark" class="text-right">{{v.remark}}</span>
                                </div>
                                <div class="disflex wrap p-l-25 p-r-25 jsend">
                                    <div class="goods-img w40 h40 m-r-5 m-b-5 bradius4"
                                         v-for="(img,key) in v.photos"
                                         @click="prevImg(img, k, key)"
                                         :style="'background-image: url('+img+')'">
                                    </div>
                                    <label v-if="v.photos.length<9" class="w40 h40 bradius4 textc bced position-relative ohidden icon-plus bradius4">
                                        <input type="file" class="hide" @change="uploadInputDealMoneyPic($event, k)">
                                    </label>
                                </div>
                            </div>
                        </div>


                    </div>

                </div>

            </div>

        </div>

    </div>


    <!--移至成员-->
    <select-member v-model="ascriptionId" :is-show="to_member_show" @confirm="moveCustomer(1)" @cancel="to_member_show=false"></select-member>
</div>
<!-- All Jquery -->
<!-- ============================================================== -->
<script src="js/jquery.min.js"></script>
<!-- Bootstrap popper Core JavaScript -->
<!-- <script src="../assets/node_modules/bootstrap/js/popper.min.js"></script> -->
<script src="js/bootstrap.min.js"></script>
<!--<script src="js/iview.min.js"></script>-->
<!--<link rel="stylesheet" type="text/css" href="http://unpkg.com/iview/dist/styles/iview.css">-->
<!--<script type="text/javascript" src="http://unpkg.com/iview/dist/iview.min.js"></script>-->
<!-- slimscrollbar scrollbar JavaScript -->
<script src="js/perfect-scrollbar.jquery.min.js"></script>
<!--Wave Effects -->
<!-- <script src="js/waves.js"></script> -->
<!--Menu sidebar -->
<script src="js/sidebarmenu.js"></script>
<!--Custom JavaScript -->
<script src="js/custom.min.js"></script>
<!-- ============================================================== -->
<!-- This page plugins -->
<!-- ============================================================== -->
<!--morris JavaScript -->
<!-- <script src="../assets/node_modules/raphael/raphael-min.js"></script>
<script src="../assets/node_modules/morrisjs/morris.min.js"></script> -->
<!--c3 JavaScript -->
<!-- <script src="../assets/node_modules/d3/d3.min.js"></script>
<script src="../assets/node_modules/c3-master/c3.min.js"></script> -->
<!-- Popup message jquery -->
<!-- <script src="../assets/node_modules/toast-master/js/jquery.toast.js"></script> -->
<!-- Chart JS -->
<!--<script src="js/dashboard1.js"></script>-->
<!-- ============================================================== -->
<!-- Style switcher -->
<!-- ============================================================== -->
<!-- <script src="../assets/node_modules/styleswitcher/jQuery.style.switcher.js"></script> -->
<!--<script src="../assets/node_modules/bootstrap-table/dist/bootstrap-table.min.js"></script>
<script src="../assets/node_modules/bootstrap-table/dist/bootstrap-table.ints.js"></script>-->
<script src="js/vue.js"></script>
<script src="js/layer/layer.js"></script>
<script src="js/config.js"></script><script src="js/extend.js"></script>
<!--<script type="text/javascript" src="http://vuejs.org/js/vue.min.js"></script>-->

<!--<script src="js/headers.js"></script>-->
<!--<script src="js/Aside.js"></script>-->

<script>
    $(function () {
        var vw = new Vue({
            el: '#main-wrapper',
            // components:{header},
            data: {
                username: '用户昵称',
                search_key: '',//搜索关键字
                logs_id:'1',//记录类型
                logs_type:[
                    {title:'电话拜访',id: '1'},
                    {title:'微信拜访',id: '2'},
                    {title:'手动添加',id: '3'},
                    {title:'当面拜访',id: '4'},
                    {title:'其他方式',id: '5'},
                ],
                clientInfo: {},
                to_member_show:false ,//移至成员
                lists:[
                    { id : 0 , checked:false , img:'' , name : '姓名' , tel : '13518298587' },
                    { id : 1 , checked:false , img:'' , name : '姓名' , tel : '13518298587' },
                    { id : 2 , checked:false , img:'' , name : '姓名' , tel : '13518298587' },
                    { id : 3 , checked:false , img:'' , name : '姓名' , tel : '13518298587' },
                    { id : 4 , checked:false , img:'' , name : '姓名' , tel : '13518298587' },
                ],
                followLog: [],
                followPage: 1,
                followRemark: '',
                isFollowLoading: false,
                moneyForm:{
                    money: '',
                    remark: '',
                },
                totalMoney: 0,
                moneyLog: [],
                photos: [],
                moneyLoading: false,
                moneyPage: 1,
                cardId: '',
                ascriptionId: '',
                noData: false,
            },
            mounted() {
                this.cardId = $.formatParams(location.href).id;
                this.getUserInfo();
                this.getFollowLog();
            },
            methods: {
                delPic(idx){
                    this.photos.splice(idx, 1);
                },
                // 预览图片
                prevImg(imgUrl, inputDealIdx, idx){
                    let url = $.checkImgNameIsNumber(imgUrl) ? imgUrl : (imgUrl+'.primary.png');

                    layer.confirm(`<img src="${url}" style="max-width: 100%;display: block;margin: auto"/>`,{
                        skin: 'confirm-class',
                        btn: ['删除', '确定']
                    }, (i)=>{
                        this.delImg(inputDealIdx, idx);
                    }, ()=>{

                    });
                },
                delImg(inputDealIdx, idx){
                    layer.confirm('确定要删除这张图片吗？', {
                        skin: 'confirm-class',
                        btn: ['取消', '确定']
                    },(i)=>{
                        layer.close(i);
                    }, (i)=>{
                        let data = JSON.parse(JSON.stringify(this.moneyLog[inputDealIdx]));

                        data.photos.splice(idx, 1);

                        let param = {
                            inputDealId: data.inputDealId,
                            photos: data.photos.join(',')
                        };

                        this.updateInputDealMoney(param);
                        return false;
                    });
                },
                // 成交记录上传图片
                uploadInputDealMoneyPic(e, idx){
                    console.log(e);
                    let fileElem = e.target;
                    let file = fileElem.files[0];
                    let formData = new FormData();
                    let data = JSON.parse(JSON.stringify(this.moneyLog[idx]));

                    formData.append('file', file);
                    $.uploadFile(formData).then(res=>{
                        let url = $.baseFileUrl+'/'+res.data;
                        data.photos.push(url);
                        this.updateInputDealMoney({
                            inputDealId: data.inputDealId,
                            photos: data.photos.join(',')
                        })
                    })
                },
                // 更新成交记录
                updateInputDealMoney(param){
                    $.cAjax('/crmPc/customer/inputDealMoney',{
                        data: param
                    }).then(res=>{
                        layer.alert('操作成功');
                        this.getMoneyLog();
                    });
                },
                // 上传图片
                uploadImg(e){
                    let fileElem = e.target;
                    let file = fileElem.files[0];
                    let formData = new FormData();

                    formData.append('file', file);
                    $.uploadFile(formData).then(res=>{
                        let url = $.baseFileUrl+'/'+res.data;
                        this.photos.push(url);
                        fileElem.value = '';
                    })
                },
                getUserInfo(){
                    let _this = this;

                    $.cAjax('/crmPc/customer/getCustomerInfo', {
                        data:{
                            cardId: this.cardId,
                        }
                    }).then(function (data) {
                        _this.clientInfo = data;
                        _this.getMoneyLog();
                    })
                },
                // 添加跟进记录
                addFollowLog(){
                    if (this.isFollowLoading || !this.followRemark.trim()) return;

                    let _this = this;
                    this.isFollowLoading = true;
                    $.cAjax('/crmPc/customer/addFollow', {
                        data:{
                            cardId: this.cardId,
                            followType: this.logs_id,
                            followRemark: this.followRemark,
                        }
                    }).then(function (data) {
                        _this.followPage = 1;
                        _this.getFollowLog();
                        _this.isFollowLoading = false;
                        _this.followRemark = '';
                    }).catch(function () {
                        _this.isFollowLoading = false;
                    });
                },
                // 获取跟进记录
                getFollowLog(){
                    var _this = this;

                    $.cAjax('/crmPc/customer/getFollowList',{
                        data:{
                            cardId: this.cardId,
                            pageNum: this.followPage,
                        }
                    }).then(function (data) {
                        if(data){
                            _this.noData = false;
                            data.map(val => {
                                try{
                                    val.followRemark = JSON.parse(val.followRemark);
                                }catch (e) {
                                    val.followRemark = {}
                                }
                            });

                            if (_this.followPage == 1) {
                                _this.followLog = data.reverse();
                                _this.$nextTick(function () {
                                    _this.$refs.followList.scrollTop=1000000
                                })
                            }else {
                                _this.followLog.unshift(...data.reverse());
                            }

                            _this.followPage = _this.followPage +1;
                        } else{
                            _this.noData = true;
                        }
                    })
                },
                // 获取成交记录
                getMoneyLog(){
                    var _this = this;

                    $.cAjax('/crmPc/customer/getInputDealList',{
                        data:{
                            customerId: this.clientInfo.customerId,
                            pageNum: this.moneyPage,
                        }
                    }).then(function (data) {
                        var totalMoney = 0;

                        data && data.map(val=>{
                            totalMoney += parseFloat(val.money);
                            val.photos = val.photos ? (val.photos = val.photos.split(',')) : [];
                        });
                        _this.totalMoney = (totalMoney/100).toFixed(2);
                        _this.moneyLog = data || [];
                    })
                },
                // 添加成交记录
                addMoneyLog(){
                    if(this.moneyLoading) return;

                    let _this = this;
                    let param = JSON.parse(JSON.stringify(this.moneyForm));
                    param.money = param.money*100;
                    param.customerId = this.clientInfo.customerId;
                    param.photos = this.photos.join(',');

                    this.moneyLoading = true;
                    $.cAjax('/crmPc/customer/inputDealMoney', {
                        data:param
                    }).then(function (data) {
                        layer.alert('添加成功', {time: 1000});
                        _this.moneyLoading = false;
                        _this.getMoneyLog();
                        _this.moneyForm ={
                            money: '',
                            remark: '',
                        };
                        _this.photos = [];
                    }).catch(function () {
                        _this.moneyLoading = false;
                    })
                },
                // 只能输入正整数
                onlyNum() {
                    this.$set(this.moneyForm, 'money', this.moneyForm.money.replace('-', '').split('.')[0]);
                },
                // 抢为独占
                toMonopoly(){
                    $.cAjax('/crmPc/customer/updBatchCustomerState', {
                        data:{
                            customerIds: this.clientInfo.customerId
                        }
                    }).then((data) => {
                        layer.alert('抢为独占成功', {time: 1500});
                        this.getUserInfo();
                    });
                },
                // 移动客户
                moveCustomer(customerState) {
                    if (customerState==1 && !this.ascriptionId) {
                        layer.alert('请选择移交给的员工');
                        return;
                    }

                    $.cAjax('/crmPc/customer/moveCustomer', {
                        data:{
                            customerIds: this.clientInfo.customerId,
                            customerState: customerState,
                            ascriptionId: this.ascriptionId,
                        }
                    }).then((data) => {
                        layer.alert(customerState == 1 ? '已移交给其他员工' : '移至共享成功', {time: 1500});
                        this.getUserInfo();
                        if (customerState == 1) {
                            setTimeout(function () {
                                history.back();
                            }, 1.5*1000)
                        }
                    });
                },
                //  跳转编辑客户信息页面
                toEditClient() {
                    location.href = location.origin + '/main/add-client.html?id=' + this.cardId;
                },
                log_type_tap(id){
                    this.logs_id = id;
                },
                tomember(){//移至成员
                    this.ascriptionId = '';
                    this.to_member_show = !this.to_member_show ;
                },
                btnTap(status){//点击模态框按钮
                    if(status == 0){
                        this.to_member_show = false ;
                    }else{
                        console.log('save -- ');
                        this.to_member_show = false ;
                    }
                },


            },
            filters:{
                formatFollowInfo (str, type) {

                    var obj = {};
                    try{
                        obj = JSON.parse(str);
                    }catch (e) {}

                    return obj.data
                },
                formatFollowType (type) {
                    var obj = {
                        1: '电话拜访',
                        2: '微信拜访',
                        3: '手动添加',
                        4: '当面拜访',
                        5: '其他方式',
                    }

                    return obj[type] || '';
                },

            }

        })
    })
</script>

</body>

</html>












